package app.helper;

import java.sql.SQLException;
import java.util.Map;

import javax.sql.DataSource;

import org.rails.core.db.DataSourceHelper;
import org.rails.core.model.ActiveRecord;
import org.rails.core.model.RecordNotFoundException;

@SuppressWarnings("serial")
public abstract class ApplicationHelper extends ActiveRecord {
	
	public static DataSource sysDataSource;
	
	static{
		try {
			sysDataSource = DataSourceHelper.getSystemDataSource();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public ApplicationHelper(DataSource dataSource) {
		super(dataSource);
	}
	
	public ApplicationHelper(DataSource dataSource,String tableName) {
		super(dataSource,tableName);
	}

	public ApplicationHelper(DataSource dataSource,Object id)
			throws RecordNotFoundException, SQLException {
		super(dataSource, id);
	}

	public ApplicationHelper(DataSource dataSource,Map<String, Object> m) {
		super(dataSource, m);
	}

}
